package Demo4;

public class Test {
    //    public static void main(String[] args) {
////        OldPhone oldPhone = new OldPhone("诺基亚",1000);
////        oldPhone.call();
//
//        //向上转型
////        OldPhone oldPhone = new NewPhone("小米",3999);
////        //多态
////        oldPhone.show();
//    }
//    public static void main(String[] args) {
//        Animal animal = new Bear("white");
//        animal.eat();
//        Animal animal1 = new Panda("black");
//        animal1.eat();
//    }
    public static void main(String[] args) {
        Audi audi = new SmartAudi();
        SmartAudi audi1 = (SmartAudi) audi;

        //向下转型
        audi1.automaticDrive();
        audi1.automaticParking();

    }
}
